package com.ruoyi.jjyh.controller;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.jjyh.domain.JjyhMassage;
import com.ruoyi.jjyh.service.IJjyhMassageService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 消息Controller
 * 
 * @author ruoyi
 * @date 2020-11-24
 */
@Controller
@RequestMapping("/phone/jjyh/massage")
public class JjyhMassagePhoneController extends BaseController
{

    @Autowired
    private IJjyhMassageService jjyhMassageService;

    /**
     * 获取订单消息
     * @param userId
     * @return
     */
    @RequestMapping("/getOrderMassageList")
    @ResponseBody
    public AjaxResult getMassageList(String userId){
        JjyhMassage massage = new JjyhMassage();
        massage.setUserId(userId);
        massage.setType("2");
        return success("操作成功", jjyhMassageService.selectJjyhMassageList(massage));
    }

    /**
     * 获取系统消息
     * @return
     */
    @RequestMapping("/getSysMassageList")
    @ResponseBody
    public AjaxResult getSysMassageList(){
        JjyhMassage massage = new JjyhMassage();
        massage.setType("1");
        return success("操作成功", jjyhMassageService.selectJjyhMassageList(massage));
    }

}
